package com.appkubes.mall.restful.application.brand.brand.controller;

import com.appkubes.base.core.entity.vo.PageVO;
import com.appkubes.cloud.config.params.paramValid.ParamValid;
import com.appkubes.common.Response;
import com.appkubes.mall.core.controller.BaseMallBrandController;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/7 13:10
 * @Description:
 */
@Api(tags = "品牌模块")
@RestController
@RequestMapping("/brand")
public class BrandController extends BaseMallBrandController {

    @ApiOperation("品牌列表")
    @GetMapping("/list")
    public Response list(@ParamValid PageVO pageVO){
        Page page = new Page(pageVO.getPage(),pageVO.getSize());
        IPage list = this.baseService.selectPageByEntity(page);

        return Response.success(list);

    }
}
